<div id="tagsWidget">
    <h4>Популярные Тэги</h4>
    <div id="tagsWidgetContent">
<?php
if (isset($tags) && is_array($tags)) {
    foreach ($tags as $tag){
?>
    <div>
        <a class="" href="<?=$this->baseUrl()?>/tag/<?=$tag['id']?>"><span class="label label-info"><?=$tag['name']?>&nbsp;&times;&nbsp;<?=$tag['count']?></span></a><br/>        
    </div>
<?php
    }
}
?>
    </div>
</div>